package com.xjtu.mybatisplus.web.controller;


import com.xjtu.mybatisplus.common.JsonResponse;
import com.xjtu.mybatisplus.common.utls.SecurityUtils;
import com.xjtu.mybatisplus.model.dto.UserInfoDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/auth")
@Api(tags = "测试")
public class AuthController1 {
    @ApiOperation("测试方法")
    @GetMapping("/userInfo")
    public JsonResponse<UserInfoDTO> getUserInfo() {
        return JsonResponse.success(SecurityUtils.getUserInfo());
    }

//    @GetMapping("/products/{id}")
//    public JsonResponse<Products>
}
